a = set()
for i in range(1,7):
    a.add(i)
b = set()
for i in range(2,12,2):
    b.add(i)
print(a&b)
print(a|b)